s = {1, 2, 3}
s = set([1, 2, 3])
s = set((1, 2, 3))
print(s, type(s))

# 添加
for i in range(10):
    s.add(i)
print(s)

# 删除
s.remove(0)
print(s)

# 清空
# s.clear()
# print(s)

s1 = {1, 2, "yesen"}
s2 = {"yesen", 2, 4}

# 并集
print(s1 | s2, s1.union(s2))

# 交集
print(s1 & s2, s1.intersection(s2))

# 差集
print(s1 - s2, s1.difference(s2))
